package com.steven;

import com.steven.common.utils.IdWorker;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.Bean;

/**
 * 启动程序
 *
 * @author ruoyi
 */
//@EnableOpenApi
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public class PayApplication {
    public static void main(String[] args) {
        // System.setProperty("spring.devtools.restart.enabled", "false");
        SpringApplication.run(PayApplication.class, args);
    }

    @Bean
    public IdWorker getIdWorker(){
        //创建雪花算法对象到容器中，后续可以直接@Autowired使用
        return new IdWorker(0,0);
    }

}
